package com.lemon.exam.entity.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

/**
 * 菜单-资源 视图对象
 *
 * @author Lemon
 * @since 2025/04/04 14:23:21
 */
@Getter
@Setter
@ToString
@Schema(name = "菜单-资源 - 视图对象")
public class MenuResourceVO {
    @Schema(description = "菜单ID")
    private Long menuId;

    @Schema(description = "菜单路径")
    private String menuPath;

    @Schema(description = "菜单名称")
    private String menuName;

    @Schema(description = "菜单图标")
    private String menuIcon;

    @Schema(description = "菜单父ID")
    private Long menuParentId;

    @Schema(description = "树形结构ID")
    private String treeLinkId;

    @Schema(description = "是否选中")
    private boolean selected;

    @Schema(description = "资源列表")
    private List<ResourceVO> resourceList;

    @Schema(description = "子菜单")
    private List<MenuResourceVO> children;

    public MenuResourceVO(Long menuId, String menuPath, String menuName, String menuIcon, Long menuParentId, String treeLinkId,boolean selected, List<ResourceVO> resourceList) {
        this.menuId = menuId;
        this.menuPath = menuPath;
        this.menuName = menuName;
        this.menuIcon = menuIcon;
        this.menuParentId = menuParentId;
        this.treeLinkId = treeLinkId;
        this.selected = selected;
        this.resourceList = resourceList;
    }
}
